﻿
@{
    ViewBag.Title = "跳转中...";
    Layout = "~/Views/Shared/_MyLayout.cshtml";
}
@section head{


    @Scripts.Render("~/bundles/jquery")
    <script src="~/Scripts/bootstrap.js"></script>


}
<p id="cook" style="display:block;">aaa</p>
<p id="aaa" style="display:block;">%e5%bc%ba%e5%bc%ba</p>
<p id="bbb" style="display:block;"></p>
<p id="ccc" style="display:block;">ccc</p>

<script type="text/template" id="formtest">
    <form action="@ViewBag.Url" method="post" id="formTime">
        <input type="hidden" name="RedirectView" value="redirect" />
    </form>
</script>

<script type="text/javascript">
    $(document).ready(function () {
        var ss = document.cookie
        //alert(ss);
        $("#cook").text(ss);
        //var name = getCookie("nickname");
        
        //$("#bbb").text(name);
        ////alert("强请");
        //var temp = decodeURI(name);
        //$("#ccc").text(temp);
        
        //alert(temp);
        //alert("nickname=" + decodeURI(name) + ";headimgurl=" + getCookie("headimgurl") + ";openid=" + getCookie("openid"));
        var result = $("#formtest").html();
        $(result).appendTo("body");
        $("#formTime").submit().remove(); 



        @*window.location.href = "@ViewBag.Url";*@
        //alert("aaaa");
    });
    //获取cookie
    function getCookie(cname) {
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1);
            if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
        }
        return "";
    }
    function getCookie2(name) {
        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");

        if (arr = document.cookie.match(reg))

            return (arr[2]);
        else
            return null;
    }
    function getCookie3(objName) {//获取指定名称的cookie的值 
        var arrStr = document.cookie.split("; ");
        for (var i = 0; i < arrStr.length; i++) {
            var temp = arrStr[i].split("=");
            if (temp[0] == objName)
                return unescape(temp[1]);
        }
    } 

</script>


